Optimal. Leaf size=20 \[ -\frac {x}{a}+\frac {\tan (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3250, 3254,
3852, 8} \begin {gather*} \frac {\tan (c+d x)}{a d}-\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3250
Rule 3254
Rule 3852
Rubi steps
\begin {align*} \int \frac {\sin ^2(c+d x)}{a-a \sin ^2(c+d x)} \, dx &=-\frac {x}{a}+\int \frac {1}{a-a \sin ^2(c+d x)} \, dx\\ &=-\frac {x}{a}+\frac {\int \sec ^2(c+d x) \, dx}{a}\\ &=-\frac {x}{a}-\frac {\text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{a d}\\ &=-\frac {x}{a}+\frac {\tan (c+d x)}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 27, normalized size = 1.35 \begin {gather*} \frac {-\frac {\tan ^{-1}(\tan (c+d x))}{d}+\frac {\tan (c+d x)}{d}}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 24, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )}{d a}\) | \(24\) |
default | \(\frac {\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )}{d a}\) | \(24\) |
risch | \(-\frac {x}{a}+\frac {2 i}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) | \(30\) |
norman | \(\frac {\frac {x}{a}+\frac {x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {2 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(143\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 26, normalized size = 1.30 \begin {gather*} -\frac {\frac {d x + c}{a} - \frac {\tan \left (d x + c\right )}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 34, normalized size = 1.70 \begin {gather*} -\frac {d x \cos \left (d x + c\right ) - \sin \left (d x + c\right )}{a d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 100 vs.
\(2 (12) = 24\).
time = 1.01, size = 100, normalized size = 5.00 \begin {gather*} \begin {cases} - \frac {d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} - a d} + \frac {d x}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} - a d} - \frac {2 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} - a d} & \text {for}\: d \neq 0 \\\frac {x \sin ^{2}{\left (c \right )}}{- a \sin ^{2}{\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 26, normalized size = 1.30 \begin {gather*} -\frac {\frac {d x + c}{a} - \frac {\tan \left (d x + c\right )}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.74, size = 20, normalized size = 1.00 \begin {gather*} \frac {\mathrm {tan}\left (c+d\,x\right )}{a\,d}-\frac {x}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________